home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Trading on the Edge
/
Trading On The Edge - CD-ROM Toolkit (Wayzata Technology)(2031)(1994).bin
/
pc
/
mac_file
/
vendor_d
/
neuralwa
/
nw2v50
/
hamming.nnc
< prev
next >
Wrap
Text File
|
1993-08-23
|
2KB
|
71 lines
csv3.1 !file format is Control Strategy Version 3.1
!Sept 88 (hamming.nnc) Hamming Network
!************************************************************************
!* *
!* Hamming Network Control Strategy *
!* *
!* This control strategy assumes the following layers, *
!* geometrically positioned from bottom to top of the screen: *
!* *
!* layer 0: Input Buffer *
!* layer 1: Category Layer ( same size as output buffer ) *
!* layer 2: Output Buffer *
!* *
!************************************************************************
!
!MASK label op-code operands comment
L_saR_sa trace aux3 ! set trace option to aux3
Li_aRi_a cset recall,1 ! Initialize recall count
!
! Get input
!
Li_aRi_a lset in ! input layer
L___Ri_a io read ! get input data (recall)
Li_aR___ io lrnin ! get input data (learn)
!
! Process Input Layer
!
L___Ri_a math sum|rnoise|tran|output
Li_aR___ math sum|lnoise|tran|output|fire
!
! Process Category layer ( recall )
!
L___Risa lset in,1 ! Category layer
L___Ri_a math sum|tran|output
L___Risa fcmp outputf,0 ! look at output function
L___Risa bne @out ! standard competitive layer
!
! Competition through lateral inhibition; recall until convergence
!
L___R_sa @latin cset wrk1,0 ! reset work 1 counter
L___R_sa cadd recall,1 ! increment recall counter
L___R_sa math set|tran|e=w|cterr
L___R_sa math output
L___R_sa ccmp wrk1,1 ! see if only one active
L___R_sa ble @out ! branch to output
L___R_sa fcmp lflag,36 ! end of recall schedule?
L___R_sa banz @out ! if yes, do output
L___R_sa io wrstep ! write interim data
L___R_s_ eos
L___R_sa brct @latin
L___R_sa @out cadd recall,1 ! increment recall counter
L___R_sa lset out
L___R_sa io rcltst
L___R_sa math sum|ce=e|tran|output|e-=w|swap
L___R_sa io write
!
! Learning phase
!
L_saR___ lset in,1 ! Category layer
L_saR___ math e=0|fire ! zero out errors
L_saR___ lset out
L_saR___ io lrnout ! Get desired output
L_saR___ math backp|fire ! Back-propagate output
L_saR___ lset out,-1 ! Category layer
L_saR___ math w=e|output|learn|fire ! learn
L_saR___ lset out
L_saR___ io lrnrslt ! For form's sake
!
!LisaRisa trace 0 ! turn off any trace function